package exam10;

/**
 * @author HB
 * @version 1.0
 * @description
 * @date 2021/6/30
 */
public class Customer extends Visitor{
    @Override
    public void visit(Apple apple){
        System.out.println("顾客" + name + "买了苹果。");
    }

    @Override
    public void visit(Book book){
        System.out.println("顾客" + name + "买了书。");
    }
}

